﻿<UserControl
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
  xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
  xmlns:dataControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit" 
  xmlns:login="clr-namespace:AR.LoginUI"
  xmlns:local="clr-namespace:AR.Controls"
  xmlns:auth="clr-namespace:AuthorizedNavigation.Client"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
  xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 
  x:Class="AR.MainPage"
  xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    xmlns:s="clr-namespace:FirstLook.ServiceModel.DomainServices.Client.Security;assembly=FirstLook.ServiceModel.DomainServices.Client.Security"
  mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
    <ScrollViewer Name="scroll">
        <Grid x:Name="LayoutRoot" Style="{StaticResource LayoutRootGridStyle}" >


            <Border x:Name="ContentBorder" Style="{StaticResource ContentBorderStyle}" Margin="0,62,0,0">

                <sdk:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}" 
                              Source="/LoginPage" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed" Margin="0,-1,0,0">

                    <navigation:Frame.UriMapper>
                        <uriMapper:UriMapper>
                            <uriMapper:UriMapping Uri="" MappedUri="/Views/Home.xaml"/>
                            <uriMapper:UriMapping Uri="/CreationCandidat" MappedUri="/Views/Candidat/CreationCandidat.xaml"/>
                            <uriMapper:UriMapping Uri="/CreationCandidat/{ID_CANDIDAT}" MappedUri="/Views/Candidat/CreationCandidat.xaml?id={ID_CANDIDAT}"/>
                            <uriMapper:UriMapping Uri="/EntretienOrale2/{ID_CANDIDAT}" MappedUri="/Views/EntretienOrale/PerimetreEntretien/GDC_SI_MSSKILLS.xaml?id={ID_CANDIDAT}"/>
                            <uriMapper:UriMapping Uri="/ListeCandidats" MappedUri="/Views/Candidat/ListeCandidats.xaml"/>
                            <uriMapper:UriMapping Uri="/ListeCandidats/{ID_CANDIDAT}"  MappedUri="/Views/Candidat/ListeCandidats.xaml?id={ID_CANDIDAT}" />
                            <uriMapper:UriMapping Uri="/EntretienOrale" MappedUri="/Views/EntretienOrale/EntretienOrale.xaml"/>
                            <uriMapper:UriMapping Uri="/EntretienTechnique" MappedUri="/Views/EntretienTechnique/EntretienTechniqueChildWindowView.xaml"/>
                            <uriMapper:UriMapping Uri="/EntretienTechniqueForm" MappedUri="/Views/EntretienTechnique/EntretienTechnique.xaml"/>
                            <uriMapper:UriMapping Uri="/EntretienTechniqueForm/{ID_CANDIDAT}" MappedUri="/Views/EntretienTechnique/EntretienTechnique.xaml?id={ID_CANDIDAT}"/>
                            <uriMapper:UriMapping Uri="/ResultatEntretienTechnique/{ID_CANDIDAT}" MappedUri="/Views/EntretienTechnique/ResultatEntretienTechnique.xaml?id={ID_CANDIDAT}"/>
                            <uriMapper:UriMapping Uri="/EntretienTechniqueForm/{ID_CANDIDAT}/{ID_Test}" MappedUri="/Views/EntretienTechnique/EntretienTechnique.xaml?id={ID_CANDIDAT}&amp;idtest={ID_Test}"/>
                            <uriMapper:UriMapping Uri="/Home2" MappedUri="/Views/HomeNew.xaml"/>
                            <uriMapper:UriMapping Uri="/Resultats" MappedUri="/Views/EntretienOrale/ResultatsEntretienOral.xaml" />
                            <uriMapper:UriMapping Uri="/Parametrage" MappedUri="/Views/Parametrage/GestionEntretienTechniqueView.xaml"/>
                            <uriMapper:UriMapping Uri="/Reporting" MappedUri="/Views/Reporting/ReportingView.xaml"/>
                            <!--<uriMapper:UriMapping Uri="/ImportCandidats" MappedUri="/Views/Candidat/ImportCandidatView.xaml"/>-->
                            <uriMapper:UriMapping Uri="/ResultatEntretienOral/{ID_CANDIDAT}" MappedUri="/Views/EntretienOrale/PerimetreEntretien/ResultatGDC_SI_MSSKILLS.xaml?id={ID_CANDIDAT}"/>
                            <uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml"/>
                        </uriMapper:UriMapper>
                    </navigation:Frame.UriMapper>
                    <!--<navigation:Frame.ContentLoader>
                        <auth:AuthorizedContentLoader>
                            <auth:AuthorizedContentLoader.AuthenticationContext>
                                <auth:AuthenticationContext User="{Binding User, Source={StaticResource WebContext}}"
                                                         ShowLoginBoxWhenUnauthorized="True">
                                    <auth:AuthenticationContext.UriRightMappings>
                                        <auth:UriRightMapping AuthenticationRequired="True"
                                                           Uri="/Views/Candidat/ListeCandidats.xaml"></auth:UriRightMapping>
                                        <auth:UriRightMapping AllowedRoles="PracticeManager,WorkforceManager,Admin"
                                                           Uri="/Views/Candidat/CreationCandidat.xaml"></auth:UriRightMapping>
                                        <auth:UriRightMapping   AllowedRoles="SolutionManager,Admin"
                                                           Uri="/Views/EntretienOrale/EntretienOrale.xaml"></auth:UriRightMapping>

                                    </auth:AuthenticationContext.UriRightMappings>
                                </auth:AuthenticationContext>
                            </auth:AuthorizedContentLoader.AuthenticationContext>
                        </auth:AuthorizedContentLoader>
                    </navigation:Frame.ContentLoader>-->

                </sdk:Frame>
            </Border>

            <Grid Style="{StaticResource NavigationOuterGridStyle}">
                <Grid x:Name="NavigationGrid" Style="{StaticResource NavigationGridStyle}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="25*"/>
                        <ColumnDefinition />
                        <ColumnDefinition Width="39*"/>
                    </Grid.ColumnDefinitions>

                    <Border x:Name="BrandingBorder" Style="{StaticResource BrandingBorderStyle}" Margin="25,0,0,0">

                        <StackPanel x:Name="BrandingStackPanel" Style="{StaticResource BrandingStackPanelStyle}">
                            <ContentControl Style="{StaticResource LogoIcon}"/>
                        </StackPanel>
                    </Border>
                    <!--<Border Style="{StaticResource MenuBorderStyle}" Grid.Column="1" VerticalAlignment="Center"  HorizontalAlignment="Center">
                        <StackPanel Style="{StaticResource MenuStackPanelStyle}" >
                            <Canvas x:Name="LRoot" Background="{StaticResource HighLightColorBrush}">
                                <local:MenuBar >
                                    <local:MenuBarItem MenuText="Candidat" >
                                        <local:MenuItem MenuText="Nouveau Candidat"  TargetName="ContentFrame" NavigateUri="/CreationCandidat"  />
                                        <local:MenuItem MenuText="Liste des Candidats" TargetName="ContentFrame"  NavigateUri="/ListeCandidats" >
                                        </local:MenuItem>
                                    </local:MenuBarItem>
                                    <local:MenuBarItem MenuText="Entretien" Height="28" VerticalAlignment="Bottom" >
                                        <local:MenuItem MenuText="Entretien technique écrit"  Click="MenuItem_Click" />
                                        <local:MenuItem MenuText="Entretien Orale"  TargetName="ContentFrame"  NavigateUri="/EntretienOrale" />
                                    </local:MenuBarItem>
                                </local:MenuBar>
                            </Canvas>
                        </StackPanel>
                    </Border>-->
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Top" Grid.ColumnSpan="2" />
                    <Border x:Name="LinksBorder" Style="{StaticResource LinksBorderStyle}" Grid.Column="2" Margin="0,0,15,0">
                        <StackPanel x:Name="LinksStackPanel" Style="{StaticResource LinksStackPanelStyle}">

                            <Rectangle x:Name="Divider1" Style="{StaticResource DividerStyle}"/>

                        </StackPanel>
                    </Border>
                    <HyperlinkButton x:Name="Link1" Style="{StaticResource ApplicationNameStyle}" 
                	NavigateUri="/ListeCandidats" TargetName="ContentFrame" Content="{Binding Strings.ApplicationName, Source={StaticResource ApplicationResources}}" Margin="59,11,24,10" RenderTransformOrigin="0.752,0.476"/>

                </Grid>
                <Border  Style="{StaticResource LoginContainerStyle}" Margin="0,18,0,0">
                    <login:LoginStatus Height="21" VerticalAlignment="Bottom" />
                </Border>
            </Grid>

        </Grid>
    </ScrollViewer>
</UserControl>